Sync Messages
🔐 Sync Messages Request
| Field | Details |
|---|---|
| API Name | SyncMessages |
| URL Format | <protocol>://<domain name:port>/<URL> |
| Example URL | https://localhost:8080/SyncMessages |
| Description | This request syncs all messages available in the system. Upon receiving the request, the system sends state‑based information depending on jEventType. The request must include jToken from the Authentication API response. |
📝 Sync Messages Request Parameters
| Parameter | Data Type | Description |
|---|---|---|
| jMessageType | varchar(15) | Must be sent as SYNC_MESSAGES |
| jEventType | int | Event Type: • 1 = Sync Orders• 2 = Sync Trades• 3 = Sync Multileg Orders• 4 = Sync GTD Orders• 5 = Sync Rejected Orders• 6 = Sync Position Conversion• 7 = Sync CashCollateral• 8 = Sync Algo Orders (currently only 8 is supported) |
| jManagerID | varchar(50) | Manager Identification Number |
| jCustomerId | varchar(50) | Customer ID assigned to the user |
| jExchange | int | Exchange identifier |
| jToken | varchar(512) | Authentication token from Authentication API |
| jEntrySequenceNumber | int64 | Last received sequence number. Default is 0 if not provided |
| jRequestID | varchar(255) | Echo‑back field |
Example Sync Messages Request
{
"jMessageType": "SYNC_MESSAGES",
"jEventType": 8,
"jManagerID": "<MANAGER1>",
"jCustomerId": "<MEMBER>",
"jExchange": 1,
"jToken": "<Token received in the Authentication Response>",
"jEntrySequenceNumber": "<max sequence no>",
"jRequestID": "<Echo back field>"
}
📝 Sync Messages Response
The response contains the following parameters:
| Parameter | Data Type | Description |
|---|---|---|
| jManagerId | varchar(50) | User ID assigned to the user |
| jEventType | int | Echo‑back field (same value sent in the request) |
| jCustomerId | varchar(50) | Customer ID assigned to the user |
| jLastSyncedPacket | int | Indicates if this is the last packet: 1 = last packet |
| jNoOfRecords | int | Number of records returned |
| jMessage | Detail Structure (array) | Array of message objects matching the selected jEventType; size = jNoOfRecords |
| jRequestID | varchar(255) | Echo‑back field |
| jResponseID | varchar(255) | System‑generated alphanumeric ID |
Example Response
{
"jData": {
"ManagerID": "KOTAL_10.0.0.1",
"CustomerId": "KOTAK",
"NoOfRecords": 2,
"CashCollateralDetail": [
{
"EventType": 1,
"GroupID": "HO",
"UserID": "R1",
"Key": "CC_HO_R1_1",
"LastUpdateTime": 2349888554,
"Periodicity": 1,
"DepositHeads": { },
"Utilization": { }
},
{
"EventType": 1,
"GroupID": "HO",
"UserID": "R2",
"Key": "CC_HO_R2_121",
"LastUpdateTime": 2349888554,
"Periodicity": 121,
"DepositHeads": { },
"Utilization": { }
}
]
}
}
| Parameter | Datatype | Description |
|---|---|---|
| MessageType | nVarchar(45) | CASH_COLLATERAL |
| ManagerID | varchar(40) | Null (not used) |
| GroupID | nVarchar(30) | Group ID assigned to the user |
| UserID | char(15) | User ID assigned to the user |
| EventType | int | Always 1 |
| sKey | nVarchar(145) | Composite key: CC + GroupId + DealerId + Periodicity + User |
| Periodicity | nVarchar(100) | Exchange / periodicity (e.g., NSE, BSE, MSE, All Exchange Combine) |
| CashDeposit | bigint(8) | Deposited cash of user |
| AdhocDeposit | bigint(8) | 0 |
| MiscDeposit | float(8) | 0 |
| OverdraftLimit | float(8) | 0 |
| NotionalDeposit | float(8) | 0 |
| ManualCollateral | float(8) | 0 |
| OptionCFS | float(8) | 0 |
| DPPledgedCollateral | numeric(9) | 0 |
| POOLPledgedCollateral | numeric(9) | 0 |
| DPCreditForSale | numeric(9) | 0 |
| POOLCreditForSale | numeric(9) | 0 |
| SARCollateral | numeric(9) | 0 |
| DPCollateral | numeric(9) | 0 |
| POOLCollateral | numeric(9) | 0 |
| SARCreditForSale | numeric(9) | 0 |
| Tplus5HoldingCollateral | bigint(8) | 0 |
| Tplus5HaircutCollateral | bigint(8) | 0 |
| Tplus5CFS | int(4) | 0 |
| MaxMargin | float(8) | Margin assigned |
| ExposureMargin | float(8) | Exposure margin assigned to user |
| Premium | bigint(8) | Allotted net premium |
| BookedPL | float(8) | 0 |
| MTMPL | float(8) | 0 |
| Brokerage | float(8) | 0 |
| CumulativeDeposit | bigint(8) | Limit inclusion limit set for user |
| LastUpdateTime | bigint(8) | getdate() equivalent timestamp (milliseconds) |